<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @sale_image } %>

<ul class="inline-menu">
  <li><%= button_link_to t('spree.active_sale.event.link.back'), edit_admin_active_sale_active_sale_event_url(@active_sale, @active_sale_event), :icon => 'icon-arrow-left' %></li>
</ul>

<%= form_for [:admin, @active_sale, @active_sale_event, @sale_image], :html => { :multipart => true } do |f| %>
  <fieldset data-hook="edit_image">
    <legend align="center"><%= @sale_image.attachment_file_name%></legend>
    <div data-hook="thumbnail" class="field alpha three columns align-center">
      <%= f.label Spree.t(:thumbnail) %><br>
      <%= link_to image_tag(@sale_image.attachment.url(:small)), @sale_image.attachment.url(:product) %>
    </div>
    <div class="nine columns omega">
      <%= render :partial => 'form', :locals => { :f => f } %>  
    </div>
    <div class="clear"></div>
    <div class="form-buttons filter-actions actions" data-hook="buttons">
      <%= button Spree.t(:update), 'icon-refresh' %>
      <span class="or"><%= Spree.t(:or) %></span>
        <%= link_to_with_icon 'icon-remove', Spree.t(:cancel), admin_active_sale_active_sale_event_url(@active_sale, @active_sale_event), :id => 'cancel_link', :class => 'button' %>
    </div>
  </fieldset>
<% end %>
